package com.jy.appmarket.newnetwork.http;

import java.io.IOException;
import java.io.InputStream;

public class HttpEntity {
	private InputStream content;
	private int contentLength;
	private String contentEncoding;
	// private String contentType;

	public void setContent(InputStream content) {
		this.content = content;
	}

	public void setContentLength(int contentLength) {
		this.contentLength = contentLength;
	}

	public void setContentEncoding(String contentEncoding) {
		this.contentEncoding = contentEncoding;
	}

	public void setContentType(String contentType) {
		// this.contentType = contentType;
	}

	public int getContentLength() {
		return contentLength;
	}

	public InputStream getContent() {
		return content;
	}

	public void consumeContent() throws IOException {
		if (content != null) {
			content.close();
		}
	}

	public String getContentEncoding() {
		return contentEncoding;
	}

}